const app = getApp()
Page({
    data: {
        activity: {}
    },
    onShow() {
        this.getMyData()
    },
    getMyData() {
        const num = app.globalData.activitiesNum
        console.log(num);

        let activity = app.globalData.activities[num]
        this.setData({
            activity,
        })
    },
    join() {
        // console.log('参与活动');
        // 进行网络请求
        if (app.needLogin()) {
            return
        }
        swan.showToast({
            // title: '参与活动成功\n可在"我的参与"中修改路线',
            title: '参与活动成功\n可在"我的参与"中查看',
            icon: "none",
            duration: 2000
        });
        app.setMyData(-1)
        swan.navigateBack({});
    },
});